<%@page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html>
<html>
<head>
    <title>创业武汉合伙人</title>
    <%@include file="common/header.jsp"%>
</head>
<body>
<!-- page 容器 -->
<div class="page">
    <!-- 标题栏 -->
    <header class="bar bar-nav bgcolor nobottom">
        <a class="button button-link button-nav whitecolor pull-left back  no-transition" href="javaScript:history.go(-1);">
            <span class="icon icon-left"></span>

        </a>
        <h1 class="title whitecolor">活动详情</h1>
    </header>

    <!-- 工具栏 -->
  <!--  <nav class="bar bar-tab">
        <a class="tab-item active" href="#">
            <span class="icon icon-home"></span>
            <span class="tab-label">首页</span>
        </a>
        <a class="tab-item" href="#">
            <span class="icon icon-star"></span>
            <span class="tab-label">收藏</span>
        </a>
        <a class="tab-item" href="#">
            <span class="icon icon-settings"></span>
            <span class="tab-label">设置</span>
        </a>
    </nav>-->

    <!-- 这里是页面内容区 -->
    <div class="content whitebg">
        <img src="${Dict.prefix('UPLOAD')}${activity.mainPicUrl}" alt="" style="width: 100%">
        
        
        <div class="bold_bottom p_row p_col">
            <div class="row no-gutter m_bottom">
                <div class="col-75"><strong>${activity.activityName}</strong></div>
            </div>
            <div class="little_size"><!-- 13人参加 -->&nbsp;&nbsp;&nbsp;&nbsp;${Dict.getAlias('ACTIVITY_TYPE',activity.activityType)} <%--沙龙、职场交流--%> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%-- <a class="fa fa-heart themecolor" aria-hidden="true"> 收藏</a> &nbsp;&nbsp;&nbsp;&nbsp;<a class="fa fa-share themecolor" aria-hidden="true"> 分享</a> </div>--%>
        </div>
        <!-- 
		<iframe width="100%" height="400" src="../video.html" frameborder="0" allowfullscreen>
		</iframe>
         -->
        <div class="list-block little_size">
            <ul>
                <c:if test="${activity.zbdw!=null && activity.zbdw!=''}">
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label gray"><img src="images/my.png" style="width: 1rem;vertical-align: middle;"> 主办单位</div>
                        <div class="item-input">${activity.zbdw.replaceAll('\\n','<br>')}</div>
                    </div>
                </li>
                </c:if>
                <c:if test="${activity.dwName!=null && activity.dwName!=''}">
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label gray"><img src="images/my.png" style="width: 1rem;vertical-align: middle;"> 承&nbsp;&nbsp;办&nbsp;&nbsp;方</div>
                        <div class="item-input">${activity.dwName}</div>
                    </div>
                </li>
                </c:if>
                <c:if test="${activity.zddw!=null && activity.zddw!=''}">
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label gray"><img src="images/my.png" style="width: 1rem;vertical-align: middle;"> 指导单位</div>
                        <div class="item-input">${activity.zddw}</div>
                    </div>
                </li>
                </c:if>
                <c:if test="${activity.mtzc!=null && activity.mtzc!=''}">
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label gray"><img src="images/my.png" style="width: 1rem;vertical-align: middle;"> 媒体支持</div>
                        <div class="item-input">${activity.mtzc}</div>
                    </div>
                </li>
                </c:if>
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label gray"><img src="images/time.png" style="width: 1rem;vertical-align: middle;"> 活动时间</div>
                        <div class="item-input"> <fmt:formatDate value="${activity.beginTime}" type="both" pattern="yyyy-MM-dd HH:mm"/>&nbsp;至&nbsp;<br>
                        <fmt:formatDate value="${activity.endTime}" type="both" pattern="yyyy-MM-dd HH:mm"/></div>
                    </div>
                </li>
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label gray"><img src="images/location.png" style="width: 1rem;vertical-align: middle;"> 活动地点</div>
                        <div class="item-input">${activity.address}</div>
                    </div>
                </li>
                
            <c:if test="${activity.x!=null}">
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label gray"><img src="images/location.png" style="width: 1rem;vertical-align: middle;"> 定　　位</div>
                        <div class="item-input">
						<a class="external" href="placeTheMap.do?x=${activity.x}&y=${activity.y}"><img src="images/tag.png" style="width: .8rem">
            			<c:if test="${activity.distanceKm!=null}">
						${activity.distanceKm}
            			</c:if>
						</a></div>
                    </div>
                </li>
            </c:if>
                <c:if test="${activity.guestNames!=''}"><!-- 
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label gray"><img src="images/friend.png" style="width: 1rem;vertical-align: middle;">  参加嘉宾</div>
                        <div class="item-input"><a href="#">${activity.dsEmpNames}</a></div>
                    </div>
                </li> -->
                </c:if>
                <c:if test="${activity.dsEmpNames!=null || activity.guestNames!=null}">
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label gray"><img src="images/friend.png" style="width: 1rem;vertical-align: middle;">  活动嘉宾</div>
                        <div class="item-input"><a href="#">
                        
                		<c:if test="${activity.dsEmpNames!=null && activity.guestNames!=null}">
                        ${activity.dsEmpNames}&nbsp;|&nbsp;${activity.guestNames}
                   		</c:if>
                   		
                		<c:if test="${activity.dsEmpNames==null || activity.guestNames==null}">
                        ${activity.dsEmpNames}${activity.guestNames}
                   		</c:if>
                   		
                        </a></div>
                    </div>
                </li>
                </c:if>
            </ul>
        </div>
        <c:if test="${activity.activityDy!=''}">
            <div class="home p_row p_col">
                <div class="title_style">活动导语</div>
                <div class="little_size">
                   ${activity.activityDy}
                </div>
            </div>
        </c:if>
        <c:if test="${activity.activityDesc!=''}">
            <div class="home p_row p_col">
                <div class="title_style">活动介绍</div>
                <div class="little_size">
                   ${activity.activityDesc}
                </div>
            </div>
        </c:if>
        <c:if test="${activity.attendObj!=''}">
            <div class="home p_row p_col">
                <div class="title_style">参加对象</div>
                <div class="little_size">
                   ${activity.attendObj}
                </div>
            </div>
        </c:if>
    </div>
</div>
    <c:if test="${activity.approveStatus=='SUBMITED' && (user.id==activity.adminUserId || user.id==activity.adminUserId2)}">
        <nav class="bar bar-tab ">
            <div class="tab-item active bgcolor">
                <a class="tab-label col-50 whitecolor confirm confirm-approved">审核通过</a>
                <%--<div class="tab-label col-50 join confirm-ok">待审核</div>--%>
            </div>
            <div class="tab-item active" style="background: grey">
                <a class="tab-label col-50 whitecolor confirm confirm-reject" style="color:black">审核驳回</a>
                <%--<div class="tab-label col-50 join confirm-ok">待审核</div>--%>
            </div>
        </nav>
    </c:if>

<%@include file="common/panel.jsp"%>
</body>
</html>
<%@include file="common/footer.jsp"%>
<script>
    $.init();
    $(document).on('click','.confirm', function () {
        var confirmText,alertText;
        var data = {id:"${activity.id}"};
        if($(this).hasClass('confirm-approved')){
            confirmText = "确认审核通过吗？";
            alertText = "审核通过";
            data.approveStatus ="APPROVED";
        }else{
            confirmText = "确认审核不通过吗？"
            alertText = "审核驳回";
            data.approveStatus = "REJECTED";
        }
        var ajaxParam = {
            data:data,
            url:"approveActivity.do",
            type: "POST",
            dataType: "json",
            success:function(data){
                if(data.statusCode==="300"){
                    $.alert(alertText);
                    location.href="activityByUser.do";
                }else{
                    $.alert(data.message);
                    location.href="activityByUser.do";
                }
            }
        }
        $.confirm(confirmText, function () {
            $.ajax(ajaxParam);
        });
    });
</script>